home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (C) 1990-1992 Michael Davidson.
- * All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this software
- * and its documentation for any purpose and without fee is hereby
- * granted, provided that the above copyright notice appear in all
- * copies and that both that copyright notice and this permission
- * notice appear in supporting documentation.
- *
- * This software is provided "as is" without express or implied warranty.
- */
-
- #include <stdio.h>
-
- extern double log10(double);
-
- #define SCALE (1 << 21)
- #define HALF_SCALE (1 << 20)
-
- main()
- {
- int i, j;
-
- printf("long GammaLog10[256][2] =\n{\n");
-
- printf(" { %8ld, %8ld },\n",
- 0L,
- (long)(log10((double) 0.5) * SCALE + HALF_SCALE));
-
- for (i = 1; i < 256; i++)
- {
- printf(" { %8ld, %8ld },\n",
- (long)(log10((double)i) * SCALE + HALF_SCALE),
- (long)(log10((double)i + 0.5) * SCALE + HALF_SCALE));
- }
-
- printf("};\n");
- exit(0);
- }
-